package com.wendy.read.service.controller;

import com.wendy.read.service.feign.SayHelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class TestController {


    @Autowired
    private SayHelloService sayHelloService;

    @PostMapping("/say")
    public String sayAini(String name) {
        return sayHelloService.say(name).getData() + "爱你哟！！！";
    }


    @GetMapping("/sayaini")
    public String say(String name) {
        return name + "爱你哟！！！";
    }
}
